using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace com.petiteappli.xenocide
{
    internal partial class Splash : Form
    {
        private Label LoadingText;
        private ProgressBar Progress;
        #region Constructor
        /// <summary>
        /// Constructor.
        /// </summary>
        public Splash()
        {
            InitializeComponent();
        }
        #endregion

        #region Public Methods
        /// <summary>
        /// Increments the progress bar and sets the string to be displayed.
        /// </summary>
        /// <param name="text"></param>
        public void Increment(string text)
        {
            Progress.Increment(1);
            LoadingText.Text = text;

            Update();
            Application.DoEvents();
        }

        /// <summary>
        /// Does the same as Form.Show, except that it pumps the event queue once after
        /// showing the dialog.
        /// </summary>
        public new void Show()
        {
            base.Show();
            Application.DoEvents();
        }
        #endregion

        private void InitializeComponent()
        {
            this.Progress = new System.Windows.Forms.ProgressBar();
            this.LoadingText = new System.Windows.Forms.Label();
            this.SuspendLayout();
            // 
            // progressBar1
            // 
            this.Progress.Location = new System.Drawing.Point(12, 231);
            this.Progress.Name = "progressBar1";
            this.Progress.Size = new System.Drawing.Size(267, 34);
            this.Progress.TabIndex = 1;
            // 
            // label1
            // 
            this.LoadingText.AutoSize = true;
            this.LoadingText.Location = new System.Drawing.Point(11, 13);
            this.LoadingText.Name = "label1";
            this.LoadingText.Size = new System.Drawing.Size(35, 13);
            this.LoadingText.TabIndex = 2;
            this.LoadingText.Text = "label1";
            // 
            // Splash
            // 
            this.ClientSize = new System.Drawing.Size(292, 273);
            this.Controls.Add(this.LoadingText);
            this.Controls.Add(this.Progress);
            this.Name = "Splash";
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        
    }
}
